The present invention relates to a digital-analog converter (D/A converter) for converting discrete digital data into continuous analog signals and method, and a data interpolating device and method, and more specifically to a D/A conversion of voice data.
A recent digital audio apparatus, for example, a CD (Compact Disk) player, uses a D/A (digital-to-analog) converter to which an over-sampling technique is applied to obtain a continuous analog audio signal from discrete-digital voice data.
Such a D/A converter generally uses a digital filter to raise a pseudo sampling frequency by interpolating input discrete digital data, and outputs smooth analog audio signals by passing each interpolation value obtained by the digital filter through a low-pass filter after generating a staircase signal waveform with each interpolation value held by the sample holding circuit.
A data interpolating process is performed with a digital filter contained in a D/A converter using a sampling function generally referred to as a sinc function. FIG. 7 is an explanatory graph of a sinc function. This sinc function is obtained when a Dirac delta function is inverse-Fourier-transformed, and is defined as sin (xcfx80ft)/(xcfx80ft) where the sampling frequency is f. This sinc function becomes one only at a sample point, where t=0, and zero at all other sample points.
FIG. 8 shows a relation between discrete data and the interpolation value for the data. For example, smoothly changing analog voice signals are sampled at predetermined time intervals, and are then quantized, thereby obtaining discrete voice data as sampling data. AD/A converter receives the discrete digital voice data, performs an interpolating process on the data using the sinc function, and outputs continuous analog voice signals.
In FIG. 8, assume that the values of discrete data at the sampling points t1, t2, t3, and t4 arranged at equal intervals are set as Y(t1), Y(t2), Y(t3), and Y(t4), and an interpolation value y corresponding to a predetermined position t0 (at a distance a from t2) between the sampling points t2 and t3 is to be obtained.
Normally, to obtain the interpolation value y using a sampling function, the value of the sampling function at the interpolating position t0 is obtained for each piece of given discrete data, and then a convolution calculation is performed using the obtained value. To be practical, a fixed peak value is set in the central position of the sampling function for each of the sampling points t1 through t4, and the value (marked withx) of the sampling function at each interpolating position t0 is obtained, and the obtained values are added up.
With the lapse of time, the interpolating position to moves, but the level corresponding each sampling position also changes with the lapse of time. Therefore, the interpolation value y (t0) continuously changes, thereby obtaining continuous analog signals smoothly connecting each piece of the discrete data.
However, the sinc function used in the above mentioned conventional oversampling technology is a function with which the values converge into 0 at the sampling value of xc2x1∞. Therefore, it is necessary to add up the values of sinc functions for the entire discrete data to obtain correct interpolation values. However, actually, a digital filter process is performed with the range of discrete data appropriately limited in view of throughput, circuit size and the like. To obtain acceptable interpolation precision, it is necessary to set a large sampling value range in the calculation, thereby increasing the computational complexity and the circuit scale. Disclosure of the Invention
The present invention has been developed to solve the above mentioned problems, and aims at providing a digital-analog converter and method, and a data interpolating device and method capable of reducing the computational complexity and the circuit scale.
The digital-analog converter according to the present invention combines the digital data having fundamental waveforms corresponding to the values of n pieces of input discrete data in the moving average calculation or the convolution calculation, carries out oversampling on the combined digital data values, and further performs the moving average calculation or the convolution calculation on the obtained data values to obtain the digital interpolation values for the discrete data, thereby converting each digital data value containing the interpolation value into an analog quantity.
The digital-analog converter according to another aspect of the present invention includes: combining unit for combining digital data having fundamental waveforms corresponding to the values of n pieces of input discrete data in the moving average calculation or the convolution calculation; oversampling unit for sampling each of the input data values at a frequency double the level at the previous stage on the digital data generated by the combining unit, adding each of the obtained data values to each data value obtained by shifting the data values by a predetermined phase, outputting the result to the subsequent stage, and repeating these steps for several stages; calculating unit for performing the moving average calculation or the convolution calculation on each data value obtained by the oversampling unit at several stages; and D/A converting unit for converting each data value obtained by the calculating unit into an analog quantity.
The digital-analog converter according to a further aspect of the present invention includes: combining unit for combining data by adding digital data having fundamental waveforms corresponding to the values of n pieces of discrete data input in synchronization with a reference frequency clock with the digital data shifted by reference frequency clock; oversampling unit for sampling each of the input data values at a frequency clock double the level at the previous stage on the digital data generated by the combining unit, adding each of the obtained data values to each data value obtained by shifting the data values by a half clock, outputting the result to the subsequent stage, and repeating these steps for several stages; calculating unit for performing the moving average calculation or the convolution calculation at several stages by adding each data value with the value shifted by 1 clock in synchronization with the frequency clock at the final stage of the oversampling unit to each data value obtained by the oversampling unit; and D/A converting unit for converting each data value obtained by the calculating unit into an analog quantity.
The data interpolating device according to the present invention combines the digital-data having fundamental waveforms corresponding to the values of n pieces of input discrete data in the moving average calculation or the convolution calculation, carries out oversampling on the combined digital data values, and further performs the moving average calculation or the convolution calculation on the obtained data values to obtain the digital interpolation values for the discrete data, thereby converting each digital data value containing the interpolation value into an analog quantity.
The data interpolating device according to another aspect of the present invention includes: combining unit for combining digital data having fundamental waveforms corresponding to the values of n pieces of input discrete data in the moving average calculation or the convolution calculation; oversampling unit for sampling each of the input data values at a frequency double the level at the previous stage on the digital data generated by the combining unit, adding each of the obtained data values to each data value obtained by shifting the data values by a predetermined phase, outputting the result to the subsequent stage, and repeating these steps for several stages; calculating unit for performing the moving average calculation or the convolution calculation on each data value obtained by the oversampling unit at several stages; and D/A converting unit for converting each data value obtained by the calculating unit into an analog quantity.
The data interpolating device according to a further aspect of the present invention includes: combining unit for combining data by adding digital data having fundamental waveforms corresponding to the values of n pieces of discrete data input in synchronization with a reference frequency clock with the digital data shifted by reference frequency clock; oversampling unit for sampling each of the input data values at a frequency clock double the level at the previous stage on the digital data generated by the combining unit, adding each of the obtained data values to each data value obtained by shifting the data values by a half clock, outputting the result to the subsequent stage, and repeating these steps for several stages; calculating unit for performing the moving average calculation or the convolution calculation at several stages by adding each data value with the value shifted by 1 clock in synchronization with the frequency clock at the final stage of the oversampling unit to each data value obtained by the oversampling unit; and D/A converting unit for converting each data value obtained by the calculating unit into an analog quantity.
The combining unit includes, for example, n delay unit for sequentially delaying discrete data sequentially input in synchronization with the reference frequency clock by the above mentioned reference frequency clock; and sum-of-products unit for multiplying each data value output from the n delay unit by each gain value corresponding to the fundamental digital waveform, adding up the obtained multiplication results, and outputting the result to the oversampling unit.
The oversampling unit includes, for example, first calculating unit for sampling each data value of the digital data generated by the combining unit with the frequency clock double the reference frequency, and adding each data value to a value obtained by shifting each data value by a half clock; second calculating unit for sampling each data value obtained by the first calculating unit with the frequency clock four times as high as the reference frequency, and adding each data value to a value obtained by shifting each data value by a half clock; and third calculating unit for sampling each data value obtained by the second calculating unit with the frequency clock eight times as high as the reference frequency, and adding each data value to a value obtained by shifting each data value by a half clock.
The calculating unit includes, for example, a plurality of delay unit for sequentially delaying the digital data obtained by the oversampling unit by the value of the frequency clock at the final stage of the oversampling unit; and adding unit for adding up the output from the plurality of delay unit and output the result.
The digital-analog converting method of the present invention includes: a combining step of combining digital data having fundamental waveforms corresponding to the values of n pieces of input discrete data in the moving average calculation or the convolution calculation; an oversampling step of performing oversampling accompanies by the moving average calculation or the convolution calculation on the combined digital data values; a calculating step of obtaining digital interpolation values for the discrete data by performing the moving average calculation or the convolution calculation on the data values obtained by the oversampling; and a D/A converting step of converting each digital data value containing the interpolation values obtained in the above mentioned calculation into an analog quantity.
The data interpolating method of the present invention includes: a combining step of combining digital data having fundamental waveforms corresponding to the values of n pieces of input discrete data in the moving average calculation or the convolution calculation; an oversampling step of performing oversampling accompanies by the moving average calculation or the convolution calculation on the combined digital data values; and a calculating step of obtaining digital interpolation values for the discrete data by performing the moving average calculation or the convolution calculation on the data values obtained by the oversampling.
According to the present invention with the above mentioned configuration, continuous interpolation values for the original discrete data can be obtained only by combining the digital data having fundamental waveforms corresponding to the input discrete data by the moving average calculation or the convolution calculation, and performing the oversampling and the moving average calculation or the convolution calculation on the obtained data values. Therefore, it is not necessary to include sampling values in a large calculation range as in the conventional interpolation calculation performed using the sinc function, thereby reducing the computational complexity and the circuit scale.